<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>OS3Calendar demo</title>
<link type="text/css" rel="stylesheet" href="../os3calendar.css" />
<style type="text/css">
.selected0 {
	background-color: red;
	color: yellow;
	text-align: center;
}

.selected1 {
	background-color: blue;
	color: green;
	text-align: center;
}
</style>

<script type="text/javascript" src="../../os3jslib/utils.js"></script>
<script type="text/javascript" src="../os3calendar.js"></script>
<script type="text/javascript" src="../locale/it.js"></script> 

<script type="text/javascript">
function date_onclick ( year, month, day, cal )
{
	alert ( "onclick:" + year + "/" + month + "/" + day );
}

function date_changed ( year, month, day, cal )
{
	// console.debug ( "date_changed: %s-%s-%s", year, month, day );
	var e = document.getElementById ( "cal_date" );
	e.innerHTML = cal.cur_date.toLocaleString () + "<br />" + year + "/" + ( month + 1 ) + "/" + day;

	document.getElementById ( 'giorno' ).value = day;
	document.getElementById ( 'mese' ).value = month;
	document.getElementById ( 'anno' ).value = year;
}

function change_date ()
{
	cal.set_date ( document.getElementById ( 'anno' ).value, document.getElementById ( 'mese' ).value, document.getElementById ( 'giorno' ).value );
}

function style_day  ( day_of_month, month, year, style, i )
{
	if ( ! ( day_of_month % 4 ) ) return "selected" + ( i % 2 );
	return style;
	
}

function date_shown ( day, month, year, cal )
{
	// console.debug ( "DATE SHOWN: %s-%s-%s", year, month, day );
}
</script>
</head>
<body>
<div id="cal_date"></div>

<div>
asdk da lsd kaldk alkd al kdla di09as dka djkasj d9as dkasjd
asdk da lsd kaldk alkd al kdla di09as dka djkasj d9as dkasjd
asdk da lsd kaldk alkd al kdla di09as dka djkasj d9as dkasjd
asdk da lsd kaldk alkd al kdla di09as dka djkasj d9as dkasjd
asdk da lsd kaldk alkd al kdla di09as dka djkasj d9as dkasjd
sadk askdj ai9ds akdj ka dj<br />
sadk askdj ai9ds akdj ka dj<br />
sadk askdj ai9ds akdj ka dj<br />
sadk askdj ai9ds akdj ka dj<br />
sadk askdj ai9ds akdj ka dj<br />
sadk askdj ai9ds akdj ka dj<br />
sadk askdj ai9ds akdj ka dj<br />
sadk askdj ai9ds akdj ka dj<br />
sadk askdj ai9ds akdj ka dj<br />
sadk askdj ai9ds akdj ka dj<br />
sadk askdj ai9ds akdj ka dj<br />
sadk askdj ai9ds akdj ka dj<br />
sadk askdj ai9ds akdj ka dj<br />
sadk askdj ai9ds akdj ka dj<br />
sadk askdj ai9ds akdj ka dj<br />
sadk askdj ai9ds akdj ka dj<br />
sadk askdj ai9ds akdj ka dj<br />
sadk askdj ai9ds akdj ka dj<br />
sadk askdj ai9ds akdj ka dj<br />
sadk askdj ai9ds akdj ka dj<br />
ASJHS ASH ASh jHS JHS jSH J HASjh sjA HSJ ajsh ajsh ajshjash 
</div>
<div id="cal"></div>
<table border="1">
<tr>
<td><input name="giorno" id="giorno" size="3" maxlength="2" onchange="change_date()"/></td>
<td>
<select name="mese" id="mese" onchange="change_date()">
<option value="0">Gennaio</option>
<option value="1">Febbraio</option>
<option value="2">Marzo</option>
<option value="3">Aprile</option>
<option value="4">Maggio</option>
<option value="5">Giugno</option>
<option value="6">Luglio</option>
<option value="7">Agosto</option>
<option value="8">Settembre</option>
<option value="9">Ottobre</option>
<option value="10">Novembre</option>
<option value="11">Dicembre</option>
</select>
</td>
<td>
<input name="anno"   id="anno"   size="5" maxlength="4" onchange="change_date()"/>
<td>
<a href="#" onclick="os3cal_show('cal', this)"><img src="calendar.png" border="0" /></a></td>
</tr>
<tr>
<td>aaaa</td>
<td>aaaa</td>
<td>aaaa</td>
<td>aaaa</td>
</tr>
</table>

<script type="text/javascript" >
var cal = new OS3Calendar ();

cal.show_days_labels = true;
cal.is_popup = false;

cal.cbacks ['date_changed' ] = date_changed;
cal.set_date ( 1972, 0, 10 );
cal.cbacks [ 'style_day' ] = style_day;
cal.cbacks [ 'date_shown' ] = date_shown;
cal.cbacks [ 'onclick' ] = date_onclick;
cal.render ( 'cal' );
</script>




</body>
</html>
